' ****** START INCLUDE Rgba Core ****** DIM r0%, g0%, b0%, a0%, r1%, g1%, b1%, a1% DIM RbgaAreaBorder# = &h0000FF SUB SetRgb0(x%,y%) DIM c$ c$ = RIGHT$("000000" + HEX$(POINT(x%,y%)), 6) r0% = VAL("0x" + LEFT$(c$,2)) g0% = VAL("0x" + MID$(c$,3,2)) b0% = VAL("0x" + RIGHT$(c$,2)) END SUB SUB SetRgb1(c&,a%b) DIM c$ c$ = RIGHT$("000000" + HEX$(c&), 6) r1% = VAL("0x" + LEFT$(c$,2)) g1% = VAL("0x" + MID$(c$,3,2)) b1% = VAL("0x" + RIGHT$(c$,2)) a0% = 255 - a%b a1% = a%b END SUB SUB RgbaCorePset(x%,y%) PSET(x%,y%), _RGB( [{ (r0%*a0%)+(r1%*a1%) }/255], [{ (g0%*a0%)+(g1%*a1%) }/255], [{ (b0%*a0%)+(b1%*a1%) }/255] ) END SUB ' ****** END INCLUDE Rgba Core ****** Sub RgbaCircle (xc#, yc#, r#, c&, a%b) PCOPY 0,-1 CIRCLE (xc#, yc#), r#, RbgaAreaBorder# DIM xc%, yc%, r%, x%, y%, x1%, x2% xc% = fix(xc#) : yc% = fix(yc#) : r% = fix(r#) SetRgb1(c&, a%b) for y% = MAX(0,(yc% - r%)) TO MIN(_HEIGHT-1,(yc% + r%)) x1% = MAX(xc% - r%, 0) WHILE POINT(x1%, y%) <> RbgaAreaBorder# and x1% < MIN(_WIDTH - 1, xc%+r%) : x1% = x1% + 1 : WEND x2% = MIN(xc% + r%, _WIDTH - 1) WHILE POINT(x2%, y%) <> RbgaAreaBorder# and x2% > MAX(0, xc%-r%) : x2% = x2% - 1 : WEND IF x1% > xc% THEN x1% = 0 IF x2% < xc% THEN x2% = _WIDTH - 1 IF POINT(x1%,y%) = RbgaAreaBorder# OR POINT(x2%,y%) = RbgaAreaBorder# THEN FOR x% = x1% TO x2% IF POINT(x%,y%) = RbgaAreaBorder# THEN PCOPY(x%, y%) - (x%, y%), -1, 0 SetRgb0(x%,y%) : RgbaCorePset(x%,y%) NEXT x% END IF next y% END SUB SCREEN _NEWIMAGE(400,400, 27) â–¶StartIteration: x% = INT(RND*180) + 20 y% = INT(RND*180) + 20 r% = INT(RND*17) + 4 colour& = INT(RND * &hFFFFFE) + 2 alpha% = INT( RND * 125 ) RgbaCircle(x%,y%,r%,colour&,alpha%) RgbaCircle(400 - x%,y%,r%,colour&,alpha%) RgbaCircle(x%,400-y%,r%,colour&,alpha%) RgbaCircle(400-x%,400-y%,r%,colour&,alpha%) _DELAY 0.01 GOTO â–¶StartIteration